package com.realgodo.site.web.user;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.realgodo.site.entity.application.Application;
import com.realgodo.site.service.application.ApplicationManager;

/**
 * 用户后台首页
 * 
 * @author biqiang E-mail: bijiqiang@gmail.com
 * @version 创建时间：2009-12-11下午10:11:08
 */
public class IndexController extends UserDefaultController {

	private static final long serialVersionUID = 6097398821486346742L;

	@Autowired
	private ApplicationManager applicationManager;

	public String index() {
		return SUCCESS;
	}

	/**
	 * 获取全部应该服务
	 * 
	 * @return
	 */
	public List<? extends Application> getApplications() {
		return this.applicationManager.getFriendAndMyApplications(super
				.getSpace().getId(), 20);
	}
}
